package org.wangle.seckill.mq.component.seckill;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.wangle.api.properties.MQ.SecKillProperties;
import org.wangle.seckill.utils.MQUtils;

import java.util.HashMap;

public class SecKillQueue {

    @Bean
    public Queue createOrderOfSecKillQueue(){
//        HashMap<String , Object> args = new HashMap<>();
//        args.put(MQUtils.Rabbit.DEATH_EXCHANGE, SecKillProperties.secKillDeathExchange);
//        args.put(MQUtils.Rabbit.DEATH_ROUTING_KEY, SecKillProperties.secKillDeathBindingKey);
//        args.put(MQUtils.Rabbit.DELAY_TTL, SecKillProperties.secKillDelayTTL);
        return QueueBuilder.durable(SecKillProperties.secKillQueue).build();
    }

}
